<template>
  <vue-office-docx
    :src="fileUrl"
    @rendered="renderedHandler"
    @error="errorHandler"/>
</template>

<script>
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'
export default {
  name: 'officeDocx',
  components: {
    VueOfficeDocx
  },
  props: {
    fileUrl: {
      type: String,
      required: true
    }
  },
  computed: {},
  watch: {},
  methods: {
    renderedHandler() {
      console.log("渲染完成")
    },
    errorHandler() {
      console.log("word========================>渲染失败")
    }
  },
  created() {
  },
  mounted() {

  },
}
</script>

<style lang='less' scoped>

</style>